package com.woniu.sharepark.util;

import com.woniu.sharepark.common.pojo.Login;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;

/**
 * @author DELL
 * @date 2019/6/15 13:03
 * version v1.0
 */
public class GetLoginUtil {

    /**
    * 获取s当前登录用户信息
    * @title getLogin
    * @param
    * @return com.woniu.sharepark.common.pojo.Login
    * @author DELL
    * @date 2019/6/15 13:05
    **/

    public static Login getLogin(){
        Session session = SecurityUtils.getSubject().getSession();
        Login login = (Login) session.getAttribute("currentUser");
        return login;
    }
}
